extend blog_layout
block page
	h1.page-header 编辑文章
		a.pull-right.btn.btn-default(href="/main/index#/blog/detail/{{blog.id}}",target="_blank") 预览

	form.form-horizontal(role="form")
		.form-group
			label.col-sm-2.control-label 标题
			.col-sm-9
				input.form-control(type="text",ng-model="blog.title")
		.form-group
			label.col-sm-2.control-label 显示
			.col-sm-9
				input(type="checkbox",ng-model="blog.active", ng-checked="blog.active==1")
		.form-group
			label.col-sm-2.control-label 文章
			.col-sm-9
				text-angular(ng-model="blog.content")

		.form-group
			.col-sm-offset-2.col-sm-9
				button.btn.btn-primary(ng-click="save()") 保存
				|&nbsp;
				button.pull-right.btn.btn-danger(ng-click="delete()") 删除
